/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package experiments;

import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

/**
 *
 * @author o.rybyanskyy
 */
public class GetJarPath {

GetJarPath() throws UnsupportedEncodingException{
    String predecodedPath = GetJarPath.class.getProtectionDomain().getCodeSource().getLocation().getPath();
    String path = URLDecoder.decode(predecodedPath, "UTF-8");    
    File f = new File(path);

    System.out.println("here it is: " + f.getParent());
    
    }

public static void main(String[] a) throws UnsupportedEncodingException{
    new GetJarPath();
}        
    

    
}
